<?php
//论坛模型
class BbsModel extends BaseModel
{
	public function getUser($uid)
	{
		$list = M()->query('SELECT uid,username FROM '.C("DB_PREFIX").'common_member WHERE status >= 0 AND uid = '.$uid);
		if(count($list) > 0)
			return $list[0];
		else
			return false;
	}
	
	public function getECRatio()
	{
		return fanweC('MONEY_SCORE_RATIO');
	}

	public function getCreditsTrans()
	{
		return fanweC('BBS_EXTCREDITS');
	}

	public function updateUserMoney($uid,$money)
	{
		$trans = $this->getCreditsTrans();
		M()->query('UPDATE '.C("DB_PREFIX")."common_member_count SET $trans = $trans $money WHERE uid = '$uid'");
	}
}

?>